home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1997 December / PC Pro December 1997 CD-Rom coverdisc.iso / symantec / dbAnywh / JAVA.BIN / CLASSES.ZIP / sun / tools / zip / ZipEntry.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-12-14  |  1.0 KB  |  40 lines

  1. package sun.tools.zip;
  2.  
  3. public class ZipEntry implements ZipConstants {
  4.    private String path;
  5.    private boolean dir;
  6.    long length;
  7.    long mtime;
  8.    long locpos;
  9.  
  10.    ZipEntry(String var1) {
  11.       if (var1.endsWith("/")) {
  12.          var1 = var1.substring(0, var1.length() - 1);
  13.          this.dir = true;
  14.       }
  15.  
  16.       this.path = var1;
  17.    }
  18.  
  19.    public String getPath() {
  20.       return this.path;
  21.    }
  22.  
  23.    public String getName() {
  24.       int var1 = this.path.lastIndexOf(47);
  25.       return var1 < 0 ? this.path : this.path.substring(var1 + 1);
  26.    }
  27.  
  28.    public boolean isDirectory() {
  29.       return this.dir;
  30.    }
  31.  
  32.    public long length() {
  33.       return this.length;
  34.    }
  35.  
  36.    public long lastModified() {
  37.       return this.mtime;
  38.    }
  39. }
  40.